package com.wk.code.wkserver.controller.app;

import com.wk.code.wkserver.controller.common.BaseController;
import com.wk.code.wkserver.request.app.UserWithdrawRequest;
import com.wk.code.wkserver.request.base.BasePageRequest;
import com.wk.code.wkserver.response.admin.TechTypeResponse;
import com.wk.code.wkserver.response.app.BalanceDetailResponse;
import com.wk.code.wkserver.response.result.R;
import com.wk.code.wkserver.service.ITechTypeService;
import com.wk.code.wkserver.service.IUserWithdrawService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 技术类别表 前端控制器
 * </p>
 *
 * @author wq
 * @since 2021-08-15
 */
@RestController
@RequestMapping("/withdraw")
@AllArgsConstructor
@Api(tags = "app-前台用户提现")
public class WithdrawController extends BaseController {

    final IUserWithdrawService userWithdrawService;

    /**
     * 提现
     *
     * @return R
     */
    @ApiOperation(value = "提现")
    @PostMapping("/apply")
    public R<Void> save(@RequestBody UserWithdrawRequest request) {
        userWithdrawService.withdraw(getUserId(), request);
        return R.success();
    }


}
